﻿namespace ProjectAutumn
{
    public struct Vector2
    {
        public static readonly Vector2 Zero = new Vector2(0);
        public static readonly Vector2 One = new Vector2(1);
        public float X;
        public float Y;
        public Vector2(float value)
        {
            X = Y = value;
        }
        public Vector2(float x, float y)
        {
            X = x;
            Y = y;
        }
        public static Vector2 operator -(Vector2 a, Vector2 b)
        {
            a.X -= b.X;
            a.Y -= b.Y;
            return a;
        }
        public static Vector2 operator +(Vector2 a, Vector2 b)
        {
            a.X += b.X;
            a.Y += b.Y;
            return a;
        }
        public static Vector2 operator *(Vector2 a, Vector2 b)
        {
            a.X *= b.X;
            a.Y *= b.Y;
            return a;
        }
        public static Vector2 operator /(Vector2 a, Vector2 b)
        {
            a.X /= b.X;
            a.Y /= b.Y;
            return a;
        }
        public static Vector2 operator *(Vector2 a, float b)
        {
            a.X *= b;
            a.Y *= b;
            return a;
        }
        public static Vector2 operator /(Vector2 a, float b)
        {
            a.X /= b;
            a.Y /= b;
            return a;
        }
    }
}
